package com.gzsxy.esjy.message.mds.dto;

import lombok.Getter;
import lombok.Setter;

/**
 * @author xiaolong
 * @version 1.0
 * @description: TODO
 * @date 2022/6/10 14:15
 */
@Setter
@Getter
public class MdsMessage {
    private static final String HEARTBEAT = "heartbeat";

    /**
     * 命令
     */
    private String command;

    /**
     * 类型（request，response）
     */
    private String type;

    /**
     * sessionId
     */
    private String sessionId;

    /**
     * 版本号
     */
    private String version = "1.3.0";

    /**
     * 核心数据
     */
    private String data;

    /**
     * @description: 心跳
     * @param
     * @return
     */
    public static MdsMessage heartbeat(String type,String sessionId){
        MdsMessage msg = new MdsMessage();
        msg.command = HEARTBEAT;
        msg.type = type;
        msg.sessionId = sessionId;
        return msg;
    }
}
